.class public abstract Lcom/estrongs/android/ui/base/ESSearchActivity;
.super Lcom/estrongs/android/ui/base/HomeAsBackActivity;
.source "ESSearchActivity.java"


# instance fields
.field private j:Landroidx/appcompat/widget/SearchView;

.field private k:Ljava/lang/String;

.field private l:Landroid/view/MenuItem;

.field private m:Landroidx/appcompat/widget/SearchView$OnQueryTextListener;

.field protected n:Landroidx/appcompat/widget/Toolbar;


# direct methods
.method public constructor <init>()V
    .locals 0

    .line 1
    invoke-direct {p0}, Lcom/estrongs/android/ui/base/HomeAsBackActivity;-><init>()V

    return-void
.end method

.method static synthetic a(Lcom/estrongs/android/ui/base/ESSearchActivity;)Landroidx/appcompat/widget/SearchView$OnQueryTextListener;
    .locals 0

    .line 2
    iget-object p0, p0, Lcom/estrongs/android/ui/base/ESSearchActivity;->m:Landroidx/appcompat/widget/SearchView$OnQueryTextListener;

    return-object p0
.end method

.method static synthetic a(Lcom/estrongs/android/ui/base/ESSearchActivity;Ljava/lang/String;)Ljava/lang/String;
    .locals 0

    .line 1
    iput-object p1, p0, Lcom/estrongs/android/ui/base/ESSearchActivity;->k:Ljava/lang/String;

    return-object p1
.end method

.method static synthetic b(Lcom/estrongs/android/ui/base/ESSearchActivity;)Landroidx/appcompat/widget/SearchView;
    .locals 0

    .line 1
    iget-object p0, p0, Lcom/estrongs/android/ui/base/ESSearchActivity;->j:Landroidx/appcompat/widget/SearchView;

    return-object p0
.end method


# virtual methods
.method protected abstract F()V
.end method

.method public G()V
    .locals 2

    .line 1
    iget-object v0, p0, Lcom/estrongs/android/ui/base/ESSearchActivity;->j:Landroidx/appcompat/widget/SearchView;

    const/4 v1, 0x0

    invoke-virtual {v0, v1}, Landroidx/appcompat/widget/SearchView;->setOnQueryTextListener(Landroidx/appcompat/widget/SearchView$OnQueryTextListener;)V

    .line 2
    iget-object v0, p0, Lcom/estrongs/android/ui/base/ESSearchActivity;->l:Landroid/view/MenuItem;

    invoke-static {v0}, Landroidx/core/view/MenuItemCompat;->collapseActionView(Landroid/view/MenuItem;)Z

    return-void
.end method

.method public H()Z
    .locals 1

    .line 1
    iget-object v0, p0, Lcom/estrongs/android/ui/base/ESSearchActivity;->l:Landroid/view/MenuItem;

    if-nez v0, :cond_0

    const/4 v0, 0x0

    return v0

    .line 2
    :cond_0
    invoke-static {v0}, Landroidx/core/view/MenuItemCompat;->isActionViewExpanded(Landroid/view/MenuItem;)Z

    move-result v0

    return v0
.end method

.method protected I()V
    .locals 0

    return-void
.end method

.method public J()V
    .locals 1

    .line 1
    iget-object v0, p0, Lcom/estrongs/android/ui/base/ESSearchActivity;->l:Landroid/view/MenuItem;

    if-nez v0, :cond_0

    return-void

    .line 2
    :cond_0
    invoke-static {v0}, Landroidx/core/view/MenuItemCompat;->expandActionView(Landroid/view/MenuItem;)Z

    return-void
.end method

.method protected a(Landroidx/appcompat/widget/ActionMenuView;)V
    .locals 2

    .line 12
    const-class v0, Landroidx/appcompat/widget/ActionMenuView;

    :try_start_0
    const-string v1, "mPresenter"

    .line 13
    invoke-virtual {v0, v1}, Ljava/lang/Class;->getDeclaredField(Ljava/lang/String;)Ljava/lang/reflect/Field;

    move-result-object v0

    const/4 v1, 0x1

    .line 14
    invoke-virtual {v0, v1}, Ljava/lang/reflect/Field;->setAccessible(Z)V

    .line 15
    invoke-virtual {v0, p1}, Ljava/lang/reflect/Field;->get(Ljava/lang/Object;)Ljava/lang/Object;

    move-result-object p1

    check-cast p1, Landroidx/appcompat/view/menu/BaseMenuPresenter;

    .line 16
    invoke-virtual {p1}, Landroidx/appcompat/view/menu/BaseMenuPresenter;->getCallback()Landroidx/appcompat/view/menu/MenuPresenter$Callback;

    move-result-object v0

    .line 17
    new-instance v1, Lcom/estrongs/android/ui/base/ActionModeCallback$MyCallback;

    invoke-direct {v1, v0, p1}, Lcom/estrongs/android/ui/base/ActionModeCallback$MyCallback;-><init>(Landroidx/appcompat/view/menu/MenuPresenter$Callback;Landroidx/appcompat/view/menu/MenuPresenter;)V

    .line 18
    invoke-virtual {p1, v1}, Landroidx/appcompat/view/menu/BaseMenuPresenter;->setCallback(Landroidx/appcompat/view/menu/MenuPresenter$Callback;)V
    :try_end_0
    .catch Ljava/lang/NoSuchFieldException; {:try_start_0 .. :try_end_0} :catch_3
    .catch Ljava/lang/IllegalAccessException; {:try_start_0 .. :try_end_0} :catch_2
    .catch Ljava/lang/IllegalArgumentException; {:try_start_0 .. :try_end_0} :catch_1
    .catch Ljava/lang/NullPointerException; {:try_start_0 .. :try_end_0} :catch_0

    goto :goto_0

    :catch_0
    move-exception p1

    .line 19
    invoke-virtual {p1}, Ljava/lang/NullPointerException;->printStackTrace()V

    goto :goto_0

    :catch_1
    move-exception p1

    .line 20
    invoke-virtual {p1}, Ljava/lang/IllegalArgumentException;->printStackTrace()V

    goto :goto_0

    :catch_2
    move-exception p1

    .line 21
    invoke-virtual {p1}, Ljava/lang/IllegalAccessException;->printStackTrace()V

    goto :goto_0

    :catch_3
    move-exception p1

    .line 22
    invoke-virtual {p1}, Ljava/lang/NoSuchFieldException;->printStackTrace()V

    :goto_0
    return-void
.end method

.method protected a(Landroidx/appcompat/widget/Toolbar;)V
    .locals 2

    .line 3
    :try_start_0
    const-class v0, Landroidx/appcompat/widget/Toolbar;

    const-string v1, "mMenuView"

    .line 4
    invoke-virtual {v0, v1}, Ljava/lang/Class;->getDeclaredField(Ljava/lang/String;)Ljava/lang/reflect/Field;

    move-result-object v0

    const/4 v1, 0x1

    .line 5
    invoke-virtual {v0, v1}, Ljava/lang/reflect/Field;->setAccessible(Z)V

    .line 6
    invoke-virtual {v0, p1}, Ljava/lang/reflect/Field;->get(Ljava/lang/Object;)Ljava/lang/Object;

    move-result-object p1

    check-cast p1, Landroidx/appcompat/widget/ActionMenuView;

    .line 7
    invoke-virtual {p0, p1}, Lcom/estrongs/android/ui/base/ESSearchActivity;->a(Landroidx/appcompat/widget/ActionMenuView;)V
    :try_end_0
    .catch Ljava/lang/NoSuchFieldException; {:try_start_0 .. :try_end_0} :catch_3
    .catch Ljava/lang/IllegalAccessException; {:try_start_0 .. :try_end_0} :catch_2
    .catch Ljava/lang/IllegalArgumentException; {:try_start_0 .. :try_end_0} :catch_1
    .catch Ljava/lang/NullPointerException; {:try_start_0 .. :try_end_0} :catch_0

    goto :goto_0

    :catch_0
    move-exception p1

    .line 8
    invoke-virtual {p1}, Ljava/lang/NullPointerException;->printStackTrace()V

    goto :goto_0

    :catch_1
    move-exception p1

    .line 9
    invoke-virtual {p1}, Ljava/lang/IllegalArgumentException;->printStackTrace()V

    goto :goto_0

    :catch_2
    move-exception p1

    .line 10
    invoke-virtual {p1}, Ljava/lang/IllegalAccessException;->printStackTrace()V

    goto :goto_0

    :catch_3
    move-exception p1

    .line 11
    invoke-virtual {p1}, Ljava/lang/NoSuchFieldException;->printStackTrace()V

    :goto_0
    return-void
.end method

.method protected b(Landroidx/appcompat/widget/Toolbar;)V
    .locals 3

    .line 2
    iget-object v0, p0, Lcom/estrongs/android/ui/base/ESSearchActivity;->l:Landroid/view/MenuItem;

    invoke-static {v0}, Landroidx/core/view/MenuItemCompat;->getActionView(Landroid/view/MenuItem;)Landroid/view/View;

    move-result-object v0

    check-cast v0, Landroidx/appcompat/widget/SearchView;

    iput-object v0, p0, Lcom/estrongs/android/ui/base/ESSearchActivity;->j:Landroidx/appcompat/widget/SearchView;

    if-nez v0, :cond_0

    return-void

    :cond_0
    const v1, 0x7f090a44

    .line 3
    invoke-virtual {v0, v1}, Landroid/view/ViewGroup;->findViewById(I)Landroid/view/View;

    move-result-object v0

    check-cast v0, Landroid/widget/TextView;

    if-eqz v0, :cond_1

    .line 4
    invoke-static {}, Lcom/estrongs/android/ui/theme/b;->r()Lcom/estrongs/android/ui/theme/b;

    move-result-object v1

    const v2, 0x7f06024d

    invoke-virtual {v1, v2}, Lcom/estrongs/android/ui/theme/b;->a(I)I

    move-result v1

    invoke-virtual {v0, v1}, Landroid/widget/TextView;->setTextColor(I)V

    .line 5
    :cond_1
    new-instance v0, Lcom/estrongs/android/ui/base/ESSearchActivity$a;

    invoke-direct {v0, p0}, Lcom/estrongs/android/ui/base/ESSearchActivity$a;-><init>(Lcom/estrongs/android/ui/base/ESSearchActivity;)V

    iput-object v0, p0, Lcom/estrongs/android/ui/base/ESSearchActivity;->m:Landroidx/appcompat/widget/SearchView$OnQueryTextListener;

    .line 6
    iget-object v0, p0, Lcom/estrongs/android/ui/base/ESSearchActivity;->l:Landroid/view/MenuItem;

    new-instance v1, Lcom/estrongs/android/ui/base/ESSearchActivity$b;

    invoke-direct {v1, p0, p1}, Lcom/estrongs/android/ui/base/ESSearchActivity$b;-><init>(Lcom/estrongs/android/ui/base/ESSearchActivity;Landroidx/appcompat/widget/Toolbar;)V

    invoke-static {v0, v1}, Landroidx/core/view/MenuItemCompat;->setOnActionExpandListener(Landroid/view/MenuItem;Landroidx/core/view/MenuItemCompat$OnActionExpandListener;)Landroid/view/MenuItem;

    .line 7
    invoke-virtual {p0}, Lcom/estrongs/android/ui/base/ESSearchActivity;->I()V

    return-void
.end method

.method protected abstract c(Ljava/lang/String;)V
.end method

.method public onCreateOptionsMenu(Landroid/view/Menu;)Z
    .locals 2

    .line 1
    iget-object v0, p0, Lcom/estrongs/android/ui/base/ESSearchActivity;->n:Landroidx/appcompat/widget/Toolbar;

    if-eqz v0, :cond_0

    .line 2
    invoke-virtual {p0, v0}, Lcom/estrongs/android/ui/base/ESSearchActivity;->a(Landroidx/appcompat/widget/Toolbar;)V

    .line 3
    invoke-virtual {p0}, Landroidx/appcompat/app/AppCompatActivity;->getMenuInflater()Landroid/view/MenuInflater;

    move-result-object v0

    const v1, 0x7f0d0005

    invoke-virtual {v0, v1, p1}, Landroid/view/MenuInflater;->inflate(ILandroid/view/Menu;)V

    const v0, 0x7f09006e

    .line 4
    invoke-interface {p1, v0}, Landroid/view/Menu;->findItem(I)Landroid/view/MenuItem;

    move-result-object v0

    iput-object v0, p0, Lcom/estrongs/android/ui/base/ESSearchActivity;->l:Landroid/view/MenuItem;

    const v1, 0x7f110069

    .line 5
    invoke-interface {v0, v1}, Landroid/view/MenuItem;->setTitle(I)Landroid/view/MenuItem;

    .line 6
    iget-object v0, p0, Lcom/estrongs/android/ui/base/ESSearchActivity;->n:Landroidx/appcompat/widget/Toolbar;

    invoke-virtual {p0, v0}, Lcom/estrongs/android/ui/base/ESSearchActivity;->b(Landroidx/appcompat/widget/Toolbar;)V

    .line 7
    :cond_0
    invoke-super {p0, p1}, Lcom/estrongs/android/ui/base/HomeAsBackActivity;->onCreateOptionsMenu(Landroid/view/Menu;)Z

    move-result p1

    return p1
.end method

.method public onKeyDown(ILandroid/view/KeyEvent;)Z
    .locals 1

    const/16 v0, 0x54

    if-ne p1, v0, :cond_0

    .line 1
    invoke-virtual {p0}, Lcom/estrongs/android/ui/base/ESSearchActivity;->J()V

    const/4 p1, 0x1

    return p1

    .line 2
    :cond_0
    invoke-super {p0, p1, p2}, Landroidx/appcompat/app/AppCompatActivity;->onKeyDown(ILandroid/view/KeyEvent;)Z

    move-result p1

    return p1
.end method
